.assistant-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  background: white;
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  width: 300px;
  min-width: 200px;
  max-width: 800px;
  padding: 20px;
  box-sizing: border-box;
}

/* 添加左侧调整手柄 */
.resize-handle {
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  cursor: ew-resize;
  background: transparent;
}

/* 当正在调整大小时添加这个类 */
.resizing {
  user-select: none;
  cursor: ew-resize !important;
}

.assistant-content {
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  /* 防止内容溢出 */
  overflow-x: hidden;
  overflow-y: auto;
  height: calc(100% - 40px); /* 减去关闭按钮的空间 */
}

.close-button {
  position: absolute;
  top: 10px;
  right: 10px;
  cursor: pointer;
  padding: 5px;
  background: none;
  border: none;
  font-size: 20px;
}

/* LLM 响应样式 */
.llm-response {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    max-height: 400px;
    overflow-y: auto;
}

.llm-response h3 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 16px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 5px;
}

.translation-section {
    margin-bottom: 20px;
}

.translation-content {
    color: #2c3e50;
    font-size: 16px;
    padding: 10px;
    background-color: #fff;
    border-radius: 4px;
    border-left: 4px solid #3498db;
}

.pronunciation-section {
    margin-bottom: 20px;
}

.pronunciation-content {
    color: #2c3e50;
    font-size: 16px;
    padding: 10px;
    background-color: #fff;
    border-radius: 4px;
    border-left: 4px solid #8e44ad;
}

.history-section {
    margin-bottom: 20px;
}

.history-content {
    color: #34495e;
    padding: 10px;
    background-color: #fff;
    border-radius: 4px;
    border-left: 4px solid #2ecc71;
}

.examples-section {
    margin-bottom: 10px;
}

.examples-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.example-item {
    margin-bottom: 8px;
    padding: 8px 12px;
    background-color: #fff;
    border-radius: 4px;
    border-left: 4px solid #e74c3c;
}

.example-item:last-child {
    margin-bottom: 0;
}

.button-container {
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
}

.action-button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.memory-button {
    background-color: #3498db;
}

.memory-button:hover {
    background-color: #2980b9;
}

.action-button:hover {
    background-color: #45a049;
}

.action-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.status-message {
    font-size: 14px;
    margin-left: 10px;
}

.story-container {
    margin-top: 20px;
    padding: 15px;
    background-color: #fff;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.story-content {
    color: #2c3e50;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
}

/* 调整按钮容器的布局 */
.button-container {
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
    justify-content: space-between;
}

.action-button {
    flex: 1;
    min-width: 100px;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    text-align: center;
}

/* 聊天界面样式 */
.chat-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 200px);
  margin-top: 20px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  background-color: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 10px;
}

.chat-message {
  margin-bottom: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  max-width: 80%;
}

.user-message {
  background-color: #e3f2fd;
  margin-left: auto;
}

.bot-message {
  background-color: #fff;
  margin-right: auto;
}

.chat-input-container {
  display: flex;
  gap: 10px;
}

.chat-input {
  flex: 1;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  resize: none;
}

.chat-send-button {
  padding: 8px 16px;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.chat-send-button:hover {
  background-color: #45a049;
}

.highlighted-word {
    background-color: #fff3d4;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: bold;
    color: #d35400;
    border: 1px solid #f1c40f;
} 